home *** CD-ROM | disk | FTP | other *** search
/ The Business Master (3rd Edition) / The Business Master (3rd Edition).iso / files / utilstem / util2 / sweep.do1 < prev    next >
Encoding:
Text File  |  1986-10-30  |  2.3 KB  |  60 lines

  1.  
  2.           SWEEP                                  Charles Petzold
  3.           Command                                         No. 31
  4.  
  5.           ______________________________________________________
  6.  
  7.           Purpose:  Causes a command to be successively executed
  8.                     in every subdirectory on a hard disk.
  9.  
  10.           Format:   SWEEP Command [parameter(s)]
  11.  
  12.           Remarks:  SWEEP starts from the current directory.  In
  13.                     order to use SWEEP to extend the range of a
  14.                     command to all the subdirectories on a disk,
  15.                     use CD (if necessary) to make the root
  16.                     directory your current directory.  From the
  17.                     root directory, the command
  18.  
  19.                          SWEEP DIR
  20.  
  21.                     will display the listings, by subdirectory,
  22.                     of every non-hidden file on the disk.  To
  23.                     erase all the .BAK files on a disk you need
  24.                     only get into the root directory and issue
  25.                     the command
  26.  
  27.                          SWEEP DEL *.BAK
  28.  
  29.                     SWEEP itself will not accept parameters other than 
  30.                     its command.  Thus, if you are on drive C: and 
  31.                     wish a directory of all files on drive D: to be 
  32.                     sent to your printer, you must first make drive D: 
  33.                     the current drive before you issue the command 
  34.  
  35.                          SWEEP DIR > LPT1
  36.  
  37.                     (In this case you would either need a copy of
  38.                     SWEEP.COM on drive D: or else drive D: would
  39.                     have to be listed on your PATH.)
  40.  
  41.                     SWEEP can execute .BAT file commands (and
  42.                     even non-DOS commands, such as LOCATE.COM).
  43.                     A useful file called CLEAN.BAT might consist
  44.                     of the three lines
  45.  
  46.                     DEL *.BAK
  47.                     DEL *.TMP
  48.                     DEL *.OBJ
  49.  
  50.                     From the root directory, if you then enter
  51.  
  52.                          SWEEP CLEAN
  53.  
  54.                     all .BAK, .TMP, and .OBJ files will be erased
  55.                     from the disk.
  56.  
  57.                     Notes:
  58.  
  59.                     1.   Requires DOS 2.0 or later.
  60.